from solidot.db import mysql as sql
from solidot.items import NewsItem

class NewsPipeline(object):

    def process_item(self, item, spider):
        db = sql.getIntance('local','rzfeng')
        if isinstance(item, NewsItem):
            print ('PornVideoItem True')
            try:

                sql.insertdb(db,item=item)
            except Exception:
                pass

        return item